import { Modal,Button } from 'antd';
import React from 'react';
import RefuseModal from './RefuseModal';
class ReturnModal extends React.Component {
  state = {
    visible: false,
    text: '',
    data:'',
  };

  showModal = () => {
    this.setState({
      visible: true,
    });
  };

  handleOk = e => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };

  handleCancel = e => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };

  render() {
    return (
      <div>
        <a href='#!' onClick={this.showModal}>
          {this.props.text}
        </a>
        <Modal
          title="退货详细信息"
          visible={this.state.visible}
          onOk={this.handleOk}
          onCancel={this.handleCancel}
          footer={[
            <Button key="submit" type="primary" onClick={this.handleOk}>确认退货</Button>,
            <Button key="back" onClick={this.handleCancel}><RefuseModal /></Button>,
          ]}
        >
         {/* <p>退货详细信息</p>
         <div>
            <button>确认退货</button>
            <button></button>
         </div> */}
        </Modal>
      </div>
    );
  }
}

export default ReturnModal;